cmake_minimum_required(VERSION 3.12)

project(riscv_sim)

file(GLOB_RECURSE SOURCES "src/*.c" "src/*.h")

add_executable(riscv_sim ${SOURCES})
add_compile_options(-g)

set(SDL2_INCLUDE_DIRS "/usr/include/SDL2")

#find_package(SDL2 REQUIRED)
include_directories(
    ${SDL2_INCLUDE_DIRS}
    ${CMAKE_SOURCE_DIR}/src
)

#set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -O3")
target_link_libraries(riscv_sim PRIVATE pthread SDL2)
target_include_directories(riscv_sim PRIVATE "usr/lib/libSDL2.a")

